package com.itheima.service;

import com.itheima.bean.ArticleContext;
import com.itheima.bean.ArticleList;
import com.itheima.bean.FrontArticleVO;
import com.itheima.dto.PageArticles;
import com.itheima.dto.YddArticleDTO;
import com.itheima.result.PageData;
import com.itheima.vo.IndexAllDataVO;
import com.itheima.vo.YddArticleShowVO;
import com.itheima.vo.YddArticleVO;

public interface YddArticleService {

    /**
     * pag
     *
     * @param pageArticles 页面文章
     * @return {@link PageData}
     */
    PageData pag(PageArticles pageArticles);

    /**
     * 查询文章
     *
     * @param id id
     * @return {@link YddArticleVO}
     */
    YddArticleVO queryArticle(Integer id);

    /**
     * 删除文章
     *
     * @param id id
     */
    void deleteArticle(Integer id);

    /**
     * 更新文章
     *
     * @param yddArticleDTO ydd文章do
     */
    void updateArticle(YddArticleDTO yddArticleDTO);

    /**
     * 创建文章
     *
     * @param yddArticleDTO ydd文章do
     */
    void creatArticle(YddArticleDTO yddArticleDTO);

    /**
     * 热门文章
     *
     * @return {@link FrontArticleVO}
     */
    FrontArticleVO topArticles(Integer page,Integer limit);


    /**
     * 选择热门文章
     *
     * @return {@link ArticleContext}
     */
    ArticleContext selectHotArticles();

    /**
     * 选择推荐文章
     *
     * @return {@link ArticleContext}
     */
    ArticleContext selectRecommendArticles();

    /**
     * 显示文章
     *
     * @param id id
     * @return {@link YddArticleShowVO}
     */
    YddArticleShowVO showArticles(Integer id);

    /**
     * 文章列表
     *
     * @param page   第页
     * @param limit  限制
     * @param cateid cateid
     * @return {@link ArticleList}
     */
    ArticleList articleList(Integer page, Integer limit, Integer cateid);

    /**
     * 索引数据
     *
     * @return {@link IndexAllDataVO}
     */
    IndexAllDataVO indexData();
}
